<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <h2 @click='addNum'>v-on的写法采用@简写: {{num}}</h2>

      <hr>

      <h2 @click='addNum()' style="color: red;">v-on的写法采用@简写 + (): {{num}}</h2>

      <hr>

      <h2 @click='handler("ok!")'>{{msg}}</h2>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
          num:100,
          msg:"vue 的基本方法 get！！"
      },
      methods:{
          addNum() {
              this.num+=100
          },
          handler(data) {
              this.msg = this.msg + data
          }
      }
     });
  </script>
</body>
</html>
